package com.zb.entity.dto;

import com.zb.annotation.IntegerPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @Author WEN
 * @Date 2024/4/10 0010
 **/
@Data
@ApiModel("厂商工单列表排序字段对象")
public class FactoryOrderByFieldDto {
    @ApiModelProperty(value = "排序字段ID，新增不必传，修改必传")
    private Long id;

    @NotNull(message = "排序字段类型不能为空")
    @IntegerPattern(regexp = "^(1|2|3|4|5|50)$", message = "排序字段类型参数不合法")
    @ApiModelProperty(value = "排序字段类型：1-全部工单，2-待派单，3-处理中，4-已完成，5-已作废，50-待结单", required = true)
    private Integer type;

    @NotNull(message = "排序字段不能为空")
    @IntegerPattern(regexp = "^[1|2|3|4]$", message = "排序字段参数类型不合法")
    @ApiModelProperty(value = "排序字段：1-更新时间，2-创建时间，3-完成时间，4-取消时间", required = true, example = "1")
    private Integer orderByField;

    @NotNull(message = "排序不能为空")
    @IntegerPattern(regexp = "^[1|2]$", message = "排序参数类型不合法")
    @ApiModelProperty(value = "排序：1-升序，2-倒序", required = true, example = "2")
    private Integer orderBy;

    @NotNull(message = "排序字段状态不能为空")
    @ApiModelProperty(value = "排序字段状态：false-启用，true-禁用", required = true, example = "false")
    private Boolean status;
}
